package com.zjpavt.client.command;

/**
 * 当前交互指令的监听管理类
 */
public class InteractionCommandExecutor {
    private static final InteractionCommandExecutor InteractionCommandExecutor = new InteractionCommandExecutor();

    public static InteractionCommandExecutor getInstance() {
        return InteractionCommandExecutor;
    }

    private InteractionCommandListener listener;

    private InteractionCommandExecutor() {

    }

    public void addListener(InteractionCommandListener listener) {
        this.listener = listener;
    }

    public void notifyListener() {
        if (listener == null) {
            return;
        }
        listener.onInteractionCommandChange();
    }
}
